#include "StdAfx.h"
#include <ctime>
#include <string>
#include <iostream>
#include <fstream>

using namespace std;

#pragma once
class Stoper 
{
private:
	double start;
	double stop;
public:
	Stoper()
	{
		start = stop = clock();
	}
	void Start()
	{
		start = clock();
	}
	void Stop()
	{
		stop = clock();
	}
	double Result()
	{
		return double(stop-start)/CLOCKS_PER_SEC;
	}
	void PrintResult()
	{
		printf("czas: %lf\n", Result());
	}
	void SaveResult(string path){
		fstream file;
		file.open(path, ios::in | ios::out);
		if(file.is_open()){
			file << Result() << endl;
		}
		file.close();
	}
};